import { DataType } from './data.d';
import type { ColumnsType } from 'antd/es/table';

const columns: ColumnsType<DataType> = [
  {
    title: '姓名',
    dataIndex: 'username',
  },
  {
    title: '所属机构',
    dataIndex: 'orgName',
  },
  {
    title: 'ID',
    dataIndex: 'userId',
  },
];

const data: DataType[] = [
  {
    key: '1',
    name: 'John Brown',
    age: 32,
    address: 'New York No. 1 Lake Park',
  },
  {
    key: '2',
    name: 'Jim Green',
    age: 42,
    address: 'London No. 1 Lake Park',
  },
  {
    key: '3',
    name: 'Joe Black',
    age: 32,
    address: 'Sidney No. 1 Lake Park',
  },
  {
    key: '4',
    name: ' User',
    age: 99,
    address: 'Sidney No. 1 Lake Park',
  },
];
// 树的数据
const treeData = [
  {
    title: '总经办',
    key: '0',
    children: [
      {
        title: '项目审批',
        key: '1',
      },
    ],
  },
  {
    title: 'HR人事',
    key: '2',
    children: [
      {
        title: '员工休假',
        key: '3',
      },
      {
        title: '员工入职',
        key: '4',
      },
      {
        title: '招聘面试',
        key: '5',
      },
    ],
  },
  {
    title: '财务',
    key: '6',
    children: [
      {
        title: '采购类',
        key: '7',
      },
      {
        title: '报销类',
        key: '8',
      },
    ],
  },
];

export { columns, data, treeData };
